<template>
  <div id="app">
    <keep-alive>
          <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
    <div class="nav" v-show="$route.meta.showFooter">
      <div class="nav-item">
        <router-link to="/">
          <img :src="$route.path==='/'?homeactiveimg:homeimg" alt />
          <span :class="$route.path==='/'?'active':''">首页</span>
        </router-link>
      </div>
      <div class="nav-item">
        <router-link to="/order">
          <img :src="$route.path==='/order'?orderactiveimg:orderimg" alt />
          <span :class="$route.path==='/order'?'active':''">订单</span>
        </router-link>
      </div>
      <div class="nav-item">
        <router-link to="/my">
          <img :src="$route.path==='/my'?myactiveimg:myimg" alt />
          <span :class="$route.path==='/my'?'active':''">我的</span>
        </router-link>
      </div>
    </div>
  </div>
</template>
<script>
import homeimg from "@/assets/home.png";
import homeactiveimg from "@/assets/home-active.png";
import orderimg from "@/assets/orders.png";
import orderactiveimg from "@/assets/orders-active.png";
import myimg from "@/assets/my.png";
import myactiveimg from "@/assets/my-active.png";
export default {
  name: "Home",
  components: {},
  data() {
    return {
      homeimg,
      homeactiveimg,
      orderimg,
      orderactiveimg,
      myimg,
      myactiveimg
    };
  },
  methods: {},
  mounted() {}
};
</script>
<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
}
.BMap_cpyCtrl {
    display: none!important;
}
.anchorBL {
    display: none!important;
}
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  font-size: 14px;
  display: flex;
  justify-content: space-around;
  background: #eeeeee;
  height: 60px;
  padding-top: 10px;
  box-sizing: border-box;
  .nav-item {
    text-align: center;
    .active {
      color: #ad2f2f;
    }
    img {
      display: block;
      width: 30px;
      height: 30px;
    }
    a {
      color: #333333;
    }
  }
}
</style>
